Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
d3plus-timeline
Advanced tools
An easy-to-use javascript timeline.
If you use NPM, run npm install d3plus-timeline --save
. Otherwise, download the latest release. The released bundle supports AMD, CommonJS, and vanilla environments. You can also load directly from d3plus.org:
<script src="https://d3plus.org/js/d3plus-timeline.v0.4.full.min.js"></script>
A d3plus timeline extends the functionality of a d3plus-axis by also allowing user to select a given time period using a one-dimensional d3-brush. Here is all you need to do in order to create a d3plus timeline:
new d3plus.Timeline()
.domain([2001, 2010])
.render();
Click here to view this example live on the web.
This is a global class, and extends all of the methods and functionality of Axis
.
Axis
# Timeline.render([callback]) <>
Draws the timeline.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.buttonPadding([value]) <>
If value is specified, sets the button padding and returns the current class instance. If value is not specified, returns the current button padding.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.brushing([value]) <>
If value is specified, toggles the brushing value and returns the current class instance. If value is not specified, returns the current brushing value.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.brushFilter([value]) <>
If value is specified, sets the brush event filter and returns the current class instance. If value is not specified, returns the current brush event filter.
This is a static method of Timeline
, and is chainable with other methods of this Class.
function() {
return !event.button && event.detail < 2;
}
# Timeline.buttonAlign([value]) <>
If value is specified, toggles the horizontal alignment of the button timeline. Accepted values are "start"
, "middle"
and "end"
. If value is not specified, returns the current button value.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.buttonBehavior([value]) <>
If value is specified, toggles the style of the timeline. Accepted values are "auto"
, "buttons"
and "ticks"
. If value is not specified, returns the current button value.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.buttonHeight([value]) <>
If value is specified, sets the button height and returns the current class instance. If value is not specified, returns the current button height.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.handleConfig([value]) <>
If value is specified, sets the handle style and returns the current class instance. If value is not specified, returns the current handle style.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.handleSize([value]) <>
If value is specified, sets the handle size and returns the current class instance. If value is not specified, returns the current handle size.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.on([typename], [listener]) <>
Adds or removes a listener for the specified brush event typename. If a listener is not specified, returns the currently-assigned listener for the specified event typename. Mirrors the core d3-brush behavior.
This is a static method of Timeline
, and is chainable with other methods of this Class.
Param | Type |
---|---|
[typename] | String | Object |
[listener] | function |
# Timeline.selectionConfig([value]) <>
If value is specified, sets the selection style and returns the current class instance. If value is not specified, returns the current selection style.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.selection([value]) <>
If value is specified, sets the selection and returns the current class instance. If value is not specified, returns the current selection. Defaults to the most recent year in the timeline.
This is a static method of Timeline
, and is chainable with other methods of this Class.
# Timeline.snapping([value]) <>
If value is specified, toggles the snapping value and returns the current class instance. If value is not specified, returns the current snapping value.
This is a static method of Timeline
, and is chainable with other methods of this Class.
FAQs
An easy-to-use javascript timeline.
We found that d3plus-timeline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.